﻿<phone:PhoneApplicationPage 
    x:Class="YiDingCanWp7.SearchSetting"
    xmlns:local="clr-namespace:YiDingCanWp7"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"  
    mc:Ignorable="d" d:DesignHeight="800" d:DesignWidth="480"
    shell:SystemTray.IsVisible="False">
    <phone:PhoneApplicationPage.Resources>
        <local:SearchSettings x:Key="searchSetting"></local:SearchSettings>
    </phone:PhoneApplicationPage.Resources>
        <!--LayoutRoot 是包含所有页面内容的根网格-->
    <Grid x:Name="LayoutRoot" Background="#FFE67B08">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel 包含应用程序的名称和页标题-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Text=" 易订餐" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="搜索" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--ContentPanel - 在此处放置其他内容-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="25*" />
                <ColumnDefinition Width="431*" />
            </Grid.ColumnDefinitions>
            <Button Content="搜索" Height="89" HorizontalAlignment="Center" Margin="-9,352,10,0" Name="Btn_Search" VerticalAlignment="Top" Width="400" Click="Btn_Search_Click" Grid.Column="1" RenderTransformOrigin="0.5,0.5" />
            <CheckBox Content="餐馆"  IsChecked="{Binding Source={StaticResource searchSetting},Path=BoolDinner,Mode=TwoWay}" Height="72" HorizontalAlignment="Left" Margin="93,10,0,0" Name="checkBox_Dinner" VerticalAlignment="Top" Grid.Column="1" />
            <CheckBox Content="鲜花" IsChecked="{Binding Source={StaticResource searchSetting},Path=BoolFlower,Mode=TwoWay}" Height="72" HorizontalAlignment="Left" Margin="10,10,0,0" Name="checkBox_Flower" VerticalAlignment="Top" Grid.ColumnSpan="2" />
            <CheckBox Content="超市" IsChecked="{Binding Source={StaticResource searchSetting},Path=BoolSuperMarket,Mode=TwoWay}" Height="72" HorizontalAlignment="Left" Margin="224,10,0,0" Name="checkBox_SuperMarket" VerticalAlignment="Top" Grid.Column="1" />
            <CheckBox Content="药店" IsChecked="{Binding Source={StaticResource searchSetting},Path=BoolDrug,Mode=TwoWay}" Height="72" HorizontalAlignment="Left" Margin="12,67,0,0" Name="checkBox_Drug" VerticalAlignment="Top" Grid.ColumnSpan="2" />
            <RadioButton  Content="500米" GroupName="distance" IsChecked="{Binding Source={StaticResource searchSetting},Path=BoolDistance500,Mode=TwoWay}" Height="72" HorizontalAlignment="Left" Margin="22,145,0,0" Name="checkBox_500" VerticalAlignment="Top" Grid.ColumnSpan="2" />
            <RadioButton Content="1公里 "  GroupName="distance" IsChecked="{Binding Source={StaticResource searchSetting},Path=BoolDistance1000,Mode=TwoWay}" Height="72" HorizontalAlignment="Left" Margin="121,145,0,0" Name="checkBox_1000" VerticalAlignment="Top" Grid.Column="1" />
            <RadioButton Content="2公里" GroupName="distance" IsChecked="{Binding Source={StaticResource searchSetting},Path=BoolDistance2000,Mode=TwoWay}" Height="72" HorizontalAlignment="Left" Margin="264,145,0,0" Name="checkBox_2000" VerticalAlignment="Top" Grid.Column="1" />
            <TextBlock Height="30"  HorizontalAlignment="Left" Margin="10,294,0,0" Name="textBlock1" Text="店名:" VerticalAlignment="Top" Grid.Column="1" />
            <TextBox Height="72" HorizontalAlignment="Left" Margin="72,280,0,0" Name="textBox_Title" Text="{Binding Source={StaticResource searchSetting},Path=KeyWord,Mode=TwoWay}" VerticalAlignment="Top" Width="332" Grid.Column="1" />
            <RadioButton Content="5公里" GroupName="distance" Height="72" HorizontalAlignment="Left" IsChecked="{Binding Source={StaticResource searchSetting}, Path=BoolDistance5000, Mode=TwoWay}" Margin="24,202,0,0" Name="radioButton1" VerticalAlignment="Top" Grid.ColumnSpan="2" />
            <RadioButton Content="10公里" GroupName="distance" Height="72" HorizontalAlignment="Left" IsChecked="{Binding Source={StaticResource searchSetting}, Path=BoolDistance10000, Mode=TwoWay}" Margin="121,202,0,0" Name="radioButton2" VerticalAlignment="Top" Grid.Column="1" />
            <RadioButton Content="20公里" GroupName="distance" Height="72" HorizontalAlignment="Right" IsChecked="{Binding Source={StaticResource searchSetting}, Path=BoolDistance20000, Mode=TwoWay}" Margin="0,202,27,0" Name="radioButton3" VerticalAlignment="Top" Grid.Column="1" />
        </Grid>
    </Grid>
</phone:PhoneApplicationPage>
